package com.topvision.domain;


import com.topvision.common.model.DataEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SysGroup extends DataEntity implements Serializable {

    private Long parentId;

    private String name;

    private Integer type;

    @Transient
    private List<SysGroup> children = new ArrayList<>();

}
